package org.innovasix.educational.javap.domain.datatypes;

class LeadingZerosPadder {

	public static String pad(int finalLength, int value) {
		String unpadded = Integer.toHexString(value);
		int additionalZeros = finalLength - unpadded.length();

		for (int i = 0; i < additionalZeros; i++) {
			unpadded = "0" + unpadded;
		}
		return unpadded.toUpperCase();
	}

}
